Array.prototype.remove=function(index){
    if(isNaN(index)||index>this.length){return false;}
    for(var i = 0, n = 0;i < this.length; i++){
        if(this[i] != this[index]){
            this[n++] = this[i]
        }
    }
    this.length-=1
};
// -------------------------------------------- hash map ---------------------------------------------------------------
var HashMap = function() {
	this.length = 0;
    this.items = new Array();
    this.keys = new Array();
    for (var i = 0; i < arguments.length; i += 2) {
        if (typeof(arguments[i + 1]) != 'undefined') {
            this.items[arguments[i]] = arguments[i + 1];
            this.length++;
        }
    }
}; 

HashMap.prototype.get = function( key) {
	return this.items[key];
};

HashMap.prototype.put = function( key, value) {
	this.keys.push(key);
    if (typeof( value) != 'undefined') {
	    if (typeof(this.items[key]) == 'undefined') {
	    	this.length++;
	    }
        this.items[key] = value;
    }
};

HashMap.prototype.remove = function(key) {
	var value;
    if (typeof(this.items[key]) != 'undefined') {
	    this.length--;
	    var value = this.items[key];
	    delete this.items[key];
    }
};

HashMap.prototype.has = function(key) {
	return typeof(this.items[key]) != 'undefined';
};

HashMap.prototype.hasKey = function(key) {
	for(var i = 0; i < this.keys.length; i++ ) {
   		if(key==this.keys[i]){
   			return true;
   		}
   	}
    return false;
};
HashMap.prototype.getKeys = function() {
    return this.keys;
};

// -------------------------------------------- index ------------------------------------------------------------------
var clickNumber = new HashMap();
var count = new HashMap();

// -------------------------------------------- ajax table base object ---------------------------------------------------------------
function eventRow(index, id){
    clickNumber.put(id, index);
	var cursor = $( "_" + id).getElementsByTagName("tr");
	for(var i = 0; i < cursor.length; i++) {
		if(cursor[i]){
	        cursor[i].firstChild.className = "";
	        //cursor[i].firstChild.innerHTML = "";
	        //cursor[i].className = "table-leftbar-highlight"
        }
    }
	if(cursor[index]){
	    cursor[index].firstChild.className = "now_td";
	    //cursor[index].firstChild.innerHTML = "4";
	   // cursor[index].className = "saturn-dynamic-row";
	}
};